package com.ambition.mallchat.common.user.dao;

import com.ambition.mallchat.common.user.domain.entity.User;
import com.ambition.mallchat.common.user.mapper.UserMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 用户表 服务实现类
 * </p>
 *
 * @author <a href="https://gitee.com/cha-longjie/mallchat.git">oldTea</a>
 * @since 2023-10-14
 */
@Service
public class UserDao extends ServiceImpl<UserMapper, User> {
    @Autowired
    UserMapper userMapper;


    public User getUserByOpenId(String code) {
        return lambdaQuery().eq(User::getOpenId,code)
                .one();
    }
}
